// 混合 -- 清除浮动影响
@mixin clearfix {
  zoom: 1;

  &:before,
  &:after {
    content: " ";
    display: table;
  }

  &:after {
    clear: both;
    visibility: hidden;
    font-size: 0;
    height: 0;
  }
}

// 使用
.box {
  padding: 10px;
  background-color: #F2F5FA;
  @include clearfix;
}
.left {
  float: left;
  width: 100px;
  height: 100px;
  background: #98adfa;
}
.right {
  float: right;
  width: 100px;
  height: 100px;
  background: #98adfa;
}
.center {
  float: left;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  background-color: #cfd34d;
}